package router

import (
	"github.com/gin-gonic/gin"

	"mxshop-api/shared/auth"
	"mxshop-api/userop-web/api/message"
	"mxshop-api/userop-web/global"
)

func InitMessageRouter(router *gin.RouterGroup) {
	signingKey := global.ServerConfig.SigningKey
	MessageRouter := router.Group("/message").Use(auth.Middleware(signingKey))
	{
		MessageRouter.GET("", message.List) // 查看留言
		MessageRouter.POST("", message.New) // 新增留言
	}
}
